﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class Yj_bianxin : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler {

    public Texture2D cursorTexture;
    private CursorMode cursorMode = CursorMode.Auto;
    private Vector2 hotSpot = Vector2.zero;
    // Use this for initialization
    void Start () {
        cursorTexture = (Texture2D)Resources.Load("hand",typeof(Texture2D));	
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    //鼠标进入变大
    public void OnPointerEnter(PointerEventData eventData)
    {
      transform.localScale*=4f;
        Cursor.SetCursor(cursorTexture, hotSpot, cursorMode);
    }
    //鼠标进入变小
    public void OnPointerExit(PointerEventData eventData)
    {

        transform.localScale/=4f;
        Cursor.SetCursor(null, Vector2.zero, cursorMode);

    }
}
